//登录按钮点击事件
$("#loginBtn").click(function() {
	console.log('username:' + $("#username").val());
	console.log('password:' + $("#password").val());
	$.ajax({
		type: "POST",
		url: baseurl+"/api/Login",
		data: {
			username: $("#username").val(),
			password: $("#password").val()
		},
		dataType: "json",
		success: function success(data) {
		    console.log(data);
		    if (data.success) {
		        if (data.data == 'teacher') {
		            location.href = "/Share";
		        }
		        else {
		            location.href = "/FormResult";
		        }
		    }
		    else {
		        $("#errorInfo").html(data.message);
		        console.log(data.message);
		    }
		},
		error: function error() {
		    console.log("error");
		}
	});
});